package com.zmxstudy.rbac.mapper;

import com.zmxstudy.rbac.entity.Brand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;

/**
* @author tianyu
* @description 针对表【brand】的数据库操作Mapper
* @createDate 2024-06-05 11:34:25
* @Entity com.zmxstudy.rbac.entity.Brand
*/
public interface BrandMapper extends BaseMapper<Brand> {
    /**
     * 查询所有品牌
     * @return ArrayList<Brand>
     */
    @Select("SELECT DISTINCT * FROM brand")
    ArrayList<Brand> selectAllBrand();

    /**
     * 根据id查询品牌
     * @param id 品牌id
     * @return Brand
     */
    @Select("SELECT * FROM brand WHERE id = #{id}")
    Brand selectBrandById(Integer id);
}




